package com.yt.base.util.json;

import com.google.gson.*;
import java.lang.reflect.Type;
import java.util.Date;

public class JsonDateSerializer implements JsonSerializer {

	public JsonDateSerializer() {
	}

	public JsonElement serialize(Object date, Type type, JsonSerializationContext context) {
		return new JsonPrimitive(Long.valueOf(((Date) date).getTime()));
	}
}
